package 力扣日常刷题.木22二月.第11天217;

/**
 * @author 帅小伙
 * @date 2022/2/17
 * @description
 */
public class Demo73JZ不用加减乘除做加法 {

    public int add(int a,int b) {
        while(b != 0){
            int c = (a & b) << 1;
            a ^= b;
            b = c;
        }
        return a;
    }

}
